<?php
class Raza extends Modelo_base {

	var $table = 'razas';

	var $has_one = array("especie");
	var $has_many = array("animal");

	// Validaciones de campos
	var $validation = array(
    	'nombre' => array(
	        'label' => 'Nombre',
	        'rules' => array('required', 'trim', 'max_length' => 60, 'unique')
			),
		'especie' => array(
	        'label' => 'Especie',
	        'rules' => array('required')
			)
	);

    // Optionally, don't include a constructor if you don't need one.
    function __construct($id = NULL)
    {
        parent::__construct($id);
    }
}

/* End of file raza.php */
/* Location: ./application/models/raza.php */